import java.util.Scanner;

public class Test {
//    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        /********** Begin *********/
//        String roster1 = scanner.nextLine();
//        String roster2 = scanner.nextLine();
//        System.out.println(roster1.length());
//        System.out.println(roster2.length());
//        if (roster1.compareTo(roster2) == 0) {
//            System.out.print("相同");
//        } else {
//            System.out.print("不相同");
//        }
//    }
public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    /********** Begin *********/
    String name=scanner.nextLine();
    String data=scanner.nextLine();
    int i=0;
    int a=0;
    while(i<data.length()){
        a=data.indexOf(name,i);
        if(a!=-1){
            System.out.println(a);
            i=a+1;
        }else{
            i++;
        }
    }


    /********** End *********/
}
}
